cmake_minimum_required(VERSION 3.28)


set(PROJECT_NAME Servo)
project(${PROJECT_NAME} C)

set(CMAKE_C_STANDARD 11)

include_directories(include)
include_directories("/app/include")
set(LIB_PATH "/app/lib/")
link_directories(${LIB_PATH})




link_libraries(wiringPi)
link_libraries(ServoShm)


set(PROJECT_SRC library.c src/cJSON.c)
add_library(${PROJECT_NAME} SHARED ${PROJECT_SRC})



install(FILES "libServo.h" DESTINATION "/app/include/")
install(FILES "Servoconfig.json" DESTINATION "/app/config/")
#install(FILES "cmake-build-release/libServo.so" DESTINATION "/app/lib/")
# 安装可执行文件的install命令

install(TARGETS ${PROJECT_NAME} DESTINATION /app/lib/)
